import json
from typing import Dict, List
from pydantic import BaseModel

class MCPServerConfig(BaseModel):
    command: str
    args: List[str]

class MCPConfig(BaseModel):
    mcpServers: Dict[str, MCPServerConfig]

    @classmethod
    def from_json_file(cls, file_path: str) -> 'MCPConfig':
        with open(file_path, 'r') as f:
            config_data = json.load(f)
        return cls(**config_data)
